<template>
    <transition name="fade"
     @after-leave='afterLeave'
    >
        <div class="loading"
         v-show="visible"
        >
            <img src="../assets/images/loading.gif" alt="loading....">
        </div>
    </transition>
</template>
<script>
export default {
    data() {
        return {
            visible: false
        }
    }
}
</script>
<style lang="less" scoped>
.loading{
    width: 8rem;
    height: 8rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    padding-top: 3rem;
    padding-left: 3rem;
    box-sizing: border-box;
    position: fixed;
    top: 40%;
    left: 50%;
    margin-left: -4rem;
    img{
        width: 2rem;
        height: 2rem;
    }
}
</style>

